1. Field of the Invention
The present invention relates to a one-chip microcomputer system, and more specifically to a one-chip microcomputer system which is mounted on an electronic register including a keyboard switch (keyboard matrix) and a display device such as a 7-segment light-emitting diode (LED) and a fluorescent display tube, a POS terminal device, a video tape recorder (VTR), and other electrical appliances.
2. Description of the Related Art
In apparatuses such as the above-mentioned electronic register, there has been a demand for a display device with high brightness and outstanding viewability, a miniaturized accommodating capacity, and a high-speed keyboard input. A conventional example which tries to satisfy such a demand is disclosed in Japanese Laid-open Publication Nos. 59-185389 and 5-325720.
Japanese Laid-open Publication No. 59-185389 discloses a miniaturized and inexpensive apparatus in which display control means and input control means are driven in time division.
Japanese Laid-open Publication No. 5-325720 discloses an inexpensive LED driving apparatus in which the number of components is reduced by driving an LED and scanning a keyboard switch in time division.
According to the above-mentioned prior arts, driving a display and scanning a keyboard switch are serially performed in a time sequence. Hereinafter, these prior arts will be described in detail.
FIG. 23 is a view showing a conventional one-chip microcomputer system. The one-chip microcomputer system includes a microcomputer 1000, a keyboard switch 2, and display LED modules 3, 4, and 5.
The keyboard switch 2 includes a number of switches S00 to S03, S10 to S13, and S20 to S23 arranged in a matrix. The display LED modules 3, 4, and 5 each have a similar configuration. The display LED module 3 will be described as an example. The display LED module 3 includes 7 LEDs D3-1 to D3-7. The LEDs D3-1 to D3-7 are connected in series to current restricting resistors R30 to R33 and R40 to R42, respectively. Anode sides of the LEDs D3-1 to D3-7 are collectively connected to transistors Q1, Q2, and Q3 which are driven with a select signal for selecting one of the display LED modules 3, 4, and 5. Cathode sides of the LEDs D3-1 to D3-7 are connected to segment driving ports P30 to P33 and P40 to P42. One end of each of base resistors R10, R11, and R12 are. connected to the transistors Q1, Q2, and Q3 for driving each LED, respectively. The other end of each of the base resistors R10, R11, and R12 are connected to output ports P10, P11, and P12 of the microcomputer 1000, respectively.
One end of each of diodes D10, D11, and D12 are connected between the base resistors R10, R11, and R12 and the output ports P10, P11, and P12. The other end of each of the diodes D10, D11, and D12 are connected to the keyboard switch 2. The diodes D10, D11 and D12 prevent failure caused by a short-circuit of the output ports P10, P11, and P12 in the case where two or more key switches are simultaneously pressed, as well as malfunction of a key input.
The leading ends of return lines from. the keyboard switch 2 are connected to ports P20, P21, P22, and P23 of the microcomputer 1000. A return signal is input from the keyboard switch 2 to the ports P20, P21, P22, and P23. Pull-up resistors R20, R21, R22, and R23 are connected in the middle of the return lines.
In the above-mentioned structure, the output ports P10, P11, and P12 work as the output ports of a select signal for a display, as well as the scanning output ports of the keyboard switch 2. The microcomputer 1000 sequentially transmits a select signal from the output ports P10, P11, and P12 in such a manner that a signal at only one port becomes a low level, and outputs an LED driving pattern synchronized with the transmitted select signal to the segment driving ports P30 to P33 and P40 to P42, whereby a display corresponding to each select is performed:
Furthermore, in scanning the keyboard switch 2, the microcomputer 1000 investigates an input pattern of the ports P20 to P23 to which a return signal is input from the keyboard switch 2 while one scanning signal is at a low level. Thus, it can be recognized which key switch is pressed.
FIG. 19 is a view showing an operation timing of the one-chip microcomputer system shown in FIG. 23.
The microcomputer 1000 outputs a select signal at a low level through the output port P10 at ti to select one of the display LED modules 3, 4, and 5. The microcomputer 1000 outputs LED driving signals from the segment driving ports P30 to P33 and P40 to P42 to display a number. A direction in which an LED driving signal travels may be reversed. At t2, all of the select signals output from the output ports P10 to P12 are turned off (high level). At t3, the subsequent select signal output from the output port P11 is turned on (low level), and LED driving signals for an LED corresponding to the select signal is output. Thereafter, a display is performed in a similar manner up to the select signal output from the output port P12.
Herein, a period in which no select signals are output is provided between t2 and t3. The purpose of this is to prevent a display pattern of the previous digit from being displayed for a short period of time during the subsequent digit after switching of a select signal. This period (between t2 and t3) corresponds to a blanking period. Accordingly, a display is processed during a period T1 from t1 to t7.
Next, during a period T2 from t9 to t12, the microcomputer 1000 turns off all the display patterns, and outputs a keyboard scanning signal to the output ports P10 to P12. Between t9 and t10, the microcomputer 1000 reads an ON/OFF state of the keyboard switch 2 corresponding to the select signal output from the output port P10 at a timing 81, through the ports P20, P21, P22, and P23. Thereafter, in a similar manner, the microcomputer 1000 reads an ON/OFF state of the keyboard switch 2 corresponding to the select signal output from the output port P11 at a timing 82 and reads an ON/OFF state of the keyboard switch 2 corresponding to the select signal output from the output port P12 at a timing S3.
As described above, in the one-chip microcomputer system shown in FIG. 23, driving of a display and scanning of a keyboard matrix are serially performed in a time sequence.
A control system in which driving a display and scanning a keyboard switch are serially performed in a time sequence has the following problems.
Since a drive duty ratio of a display is decreased by the period T2, a high-brightness LED which is expensive and difficult to obtain should be used.